Hi Henk,
Nothing special looks wrong, but here are some comments.
Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
Your wiring is very clean :}
KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
Here are some threads and topics that may help get better results and plots
Regards
TK
Group: DynoMotion |
Message: 4720 |
From: Fouijar |
Date: 5/1/2012 |
Subject: Re: Kflop tuning, which filter to use [4 Attachments] |
Hello Henk,
You may try a pole zero filter.
I had some troubles to have good stability at low speed and lack of control at higher speeds.
Keep in mind, as a rule: industrial controls are usually made with phase margin >= 45° and Gain margin >= 5 to 10 dB.
Yes, there's a lot of literature to explain why and what, but it's often not so easy to translate in "real world".
I did like that:
- Check my crossover frequency (+/- 70Hz).
- set my n1 & n2 to 70 Hz, the crossover frequency.
- the product of n1*n2=4900
You have to limit the high frequency gain so you need to choose a d2 value below critical. (ok, it's vague but too long to explain)
- choose a relatively low value for d1, i.e. d1=20Hz
- now to find your d2 you have to keep the ratio n1*n2=d1*d2
- then=> d2=(n1*n2)/d1=245Hz
Adjust your n1 and n2 to the new situation if needed, the compensator should cross the 0dB line before your system crossover frequency.
Mainly adjust your d1 and d2 to obtain PM>=45° and GM>=5dB, but keep close to n1n2=d1d2.
You have to check if d1 don't make troubles especially at very low values and d2 at high values. To decrease your phase margin you can also play with your differential gain, low phase margins are affected by integral gain.
It's not a receipt but a method based on control theory, you always can adjust with additional filters and look at the control loop diagram, the filter 2 is located after the feed forward gains.
I hope this will help you,
Jerome
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Henk,
> Â
> Nothing special looks wrong, but here are some comments.
> Â
> Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
> Â
> Your wiring is very clean :}
> Â
> KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
> Â
> D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
> Â
> Here are some threads and topics that may help get better results and plots
> Â
> http://www.cnczone.com/forums/dynomotion_kflop_kanalog/142000-optimizing_servo_tuning.html
> Â
> http://www.cnczone.com/forums/dynomotion_kflop_kanalog/142770-servo_tuning_snapamp.html
> Â
> http://tech.groups.yahoo.com/group/DynoMotion/message/2123
> Â
> http://tech.groups.yahoo.com/group/DynoMotion/message/4233
> Â
> Regards
> TK
> Â
>
>
> ________________________________
> From: Henk Sterk <henk.sterk@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, May 1, 2012 8:32 AM
> Subject: [DynoMotion] Kflop tuning, which filter to use [4 Attachments]
>
>
> Â
> [Attachment(s) from Henk Sterk included below]
> Hi Tom,
>
> My set-up is as follows:
>
> Second hand EDM rebuild to cnc.
> Kflop+Kanalog.
> 400 Watt ACÂ Panasonic Servo's in Velocity control (auto tuning)
> Glass scales on the table to close the loop to the Kflop (1 Micron resolution).
> Using Mach3
>
> I've been spending a lot of time tuning this system, and I'm very close (I think).
> This is what I've got so far:
>
> * Auto tuned the Panasonic drives using Panasonic software.
> * Adjusted P I DÂ and Low Pass filter values, getting Command and Position very close.
> * Very good position control and stiff
>
>
> Still and up with oscillations.
>
> So I've gone back to minimal settings, and hope you can tell me a bit more how to interperet the Bode plot, find attached file.
>
> Many thanks
>
> Henk
>
|
|
Group: DynoMotion |
Message: 4745 |
From: Henk Sterk |
Date: 5/3/2012 |
Subject: Re: Kflop tuning, which filter to use |
Dear Tom, Thanks for the reply. I've spend a lot more time on my machine today, and made some progress. * I've used a Pole-Zero Filter n1-n2 at 58 Hz and D1-D2 at 300 Hz, this was by trail and error went all the way up and down, and this is where I ended up.
* Only P at 1 is left I and D only gave more instability. * Try to use a low pass filter at various frequencies, but that did not get rid of the oscillations either. Now the positive, Mach3 reacts really nice and solid G0 no overshoot or large oscillations, I had before the Pole-Zero Filter.
The question is, do you have any suggestions to further improve this system (please look at the attached screen shots) and how much more accurate you think we can get this? Many thanks
On Wed, May 2, 2012 at 3:35 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
Nothing special looks wrong, but here are some comments.
Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
Your wiring is very clean :}
KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
Here are some threads and topics that may help get better results and plots
Regards
TK
Hi Tom,
My set-up is as follows:
Second hand EDM rebuild to cnc.
Kflop+Kanalog.
400 Watt AC Panasonic Servo's in Velocity control (auto tuning)
Glass scales on the table to close the loop to the Kflop (1 Micron resolution).
Using Mach3
I've been spending a lot of time tuning this system, and I'm very close (I think).
This is what I've got so far:
* Auto tuned the Panasonic drives using Panasonic software.
* Adjusted P I D and Low Pass filter values, getting Command and Position very close.
* Very good position control and stiff
Still and up with oscillations.
So I've gone back to minimal settings, and hope you can tell me a bit more how to interperet the Bode plot, find attached file.
Many thanks
Henk
|
|
Group: DynoMotion |
Message: 4751 |
From: Tom Kerekes |
Date: 5/3/2012 |
Subject: Re: Kflop tuning, which filter to use [7 Attachments] |
Hi Henk,
That doesn't look good. I worry that your Amplifier is not well tuned. You will need to test that using the Panasonic Software. That is not our responsibility. With a good/tight velocity loop handled by the amplifier simple P gain alone used for the position loop should give reasonable performance.
But otherwise: lets shoot for a bandwidth of about 30Hz. So set the lead/lag compensator to be centered around that. Yours is much too high. Try N1 N2 = 15Hz and D1 D2 = 60 Hz.
Also add a Low pass filter #2 of 2nd order 500 Hz Q=1.4 (this will greatly reduce spikes on the output - green plot)
For now keep I=D=0
Increase P until it goes unstable, then reduce until it is well stable.
Collect Plots (if you save as type *.png they will be much smaller).
Have you read the other threads about how to get a reasonable Bode Plot measurement. There must be a high enough amplitude such that you get significant movement (red plot) without saturating the Output (green plot). Also the frequency cutoff needs to be reduced at the same time so that the blue plot is moving slow enough that the red plot somewhat tries to follow it. If the red plot doesn't at least look like it is trying to follow the noisy blue plot the result will not be meaningful).
Regards
TK
Group: DynoMotion |
Message: 4762 |
From: Henk Sterk |
Date: 5/4/2012 |
Subject: Re: Kflop tuning, which filter to use |
Dear Tom, What am I doing wrong?
Spend most of today running test and making screen captures, (I'm starting to pull my hair out).
What I've done today:
* Yes I've read the links you presented me, it's getting a bit clearer but there are still holes for me.
* First re-tuned the MSDA (Panasonic) drives (using auto tuning) no setting was changed.
* Then increased the machine stiffness setting .
* Increased the velocity gain, till it started vibrating, then backed off a bit.
* Also increased the velocity integrator. * All done inside the MSDA Drive.
Then turned all filters and settings off, with only the P=1 (inside KMotion)
There was a bit of improvement shown (less vibrations in the Position graph).
Then, turned on the lead-leg compensator (Pole-Zero) at n1,n2 at 15 and d1,d2 at 60hz but had to turn the machine off as violent vibrations appeared. so increased the numbers to a level where all vibrations where gone n1-n2 =58 d1-d2=230.
Also applied Low pass filter 2nd on Filter 2, as well as a normal low pass filter (all improved a bit). Then played around with a lot of settings al little steps (see Screen caps attached).
It sort of looks like its getting there (or it's in there somewhere).
One major issue still remains, when we look at the Bode Plot, I can't seem to get the blue line to cross the 0db (to get a 30 Hz Bandwidth), also can't get the blue to follow the red in the Bode-Plot Time-Domain (how important is this, and are there exceptions?).
Mach3 is responding well though.
I still have to mention that there is a Timing Belt between the Servo Motor and Lead screw. Hope this will give you a picture of what is going on. PS
Are there other people in this Group that have a similar set-up as what I've got (DAC in Cascade)? Really hope you can help. Many thanks Henk
On Fri, May 4, 2012 at 4:55 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
That doesn't look good. I worry that your Amplifier is not well tuned. You will need to test that using the Panasonic Software. That is not our responsibility. With a good/tight velocity loop handled by the amplifier simple P gain alone used for the position loop should give reasonable performance.
But otherwise: lets shoot for a bandwidth of about 30Hz. So set the lead/lag compensator to be centered around that. Yours is much too high. Try N1 N2 = 15Hz and D1 D2 = 60 Hz.
Also add a Low pass filter #2 of 2nd order 500 Hz Q=1.4 (this will greatly reduce spikes on the output - green plot)
For now keep I=D=0
Increase P until it goes unstable, then reduce until it is well stable.
Collect Plots (if you save as type *.png they will be much smaller).
Have you read the other threads about how to get a reasonable Bode Plot measurement. There must be a high enough amplitude such that you get significant movement (red plot) without saturating the Output (green plot). Also the frequency cutoff needs to be reduced at the same time so that the blue plot is moving slow enough that the red plot somewhat tries to follow it. If the red plot doesn't at least look like it is trying to follow the noisy blue plot the result will not be meaningful).
Regards
TK
Sent: Thursday, May 3, 2012 6:47 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [7 Attachments]
Dear Tom,
Thanks for the reply.
I've spend a lot more time on my machine today, and made some progress.
* I've used a Pole-Zero Filter n1-n2 at 58 Hz and D1-D2 at 300 Hz, this was by trail and error went all the way up and down, and this is where I ended up.
* Only P at 1 is left I and D only gave more instability.
* Try to use a low pass filter at various frequencies, but that did not get rid of the oscillations either.
Now the positive, Mach3 reacts really nice and solid G0 no overshoot or large oscillations, I had before the Pole-Zero Filter.
The question is, do you have any suggestions to further improve this system (please look at the attached screen shots) and how much more accurate you think we can get this?
Many thanks
Henk
On Wed, May 2, 2012 at 3:35 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
Nothing special looks wrong, but here are some comments.
Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
Your wiring is very clean :}
KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
Here are some threads and topics that may help get better results and plots
Regards
TK
Hi Tom,
My set-up is as follows:
Second hand EDM rebuild to cnc.
Kflop+Kanalog.
400 Watt AC Panasonic Servo's in Velocity control (auto tuning)
Glass scales on the table to close the loop to the Kflop (1 Micron resolution).
Using Mach3
I've been spending a lot of time tuning this system, and I'm very close (I think).
This is what I've got so far:
* Auto tuned the Panasonic drives using Panasonic software.
* Adjusted P I D and Low Pass filter values, getting Command and Position very close.
* Very good position control and stiff
Still and up with oscillations.
So I've gone back to minimal settings, and hope you can tell me a bit more how to interperet the Bode plot, find attached file.
Many thanks
Henk
|
|
Group: DynoMotion |
Message: 4765 |
From: Tom Kerekes |
Date: 5/4/2012 |
Subject: Re: Kflop tuning, which filter to use [8 Attachments] |
Hi Henk,
I probably would not have "increased the velocity integrator" (whatever that is) in the Panasonic Drive. We mainly want fast damping (velocity feedback) to kill oscillations. An integrator is usually used to improve accuracy or persistant errors which for damping purposes don't really matter. And an Integrator is highly de-stablizing.
Some minor comments:
Your screen shots have critical info covered up.
A D gain of 0.001 will have no effect.
Please repeat the settings I've decribed in the previous email (lead/lag + low pass filter). When you had violent oscillations you should have reduced the P gain to 0.1 or whatever to eliminate them. There should always be a low enough gain to make it stable.
The belt could be a problem. Unfortunately it is a Catch 22. As we need the servo to perform reasonably to get a good Bode plot - but we need a good Bode Plot to see how to improve the Servo...
Regards
TK
Group: DynoMotion |
Message: 4778 |
From: Henk Sterk |
Date: 5/5/2012 |
Subject: Re: Kflop tuning, which filter to use |
Today's progress. I found an issue that improved some of the things: There is an acceleration and deceleration setting inside the MSDA that was set during first trails (jog at installation), and apparently interfere with closed loop controllers (now set to zero).
This fixed the issue in the Bode plot, where now the command and the output following each other (the position line remains an issue). I've also tested the Pole-Zero filter (as suggested), taking P all the way down combined with the 2nd low-pass 2 filter, that did not seem to improve our Bode Plot (open Loop) razing the Blue line above the 0 db.
Then I eliminated the timing belt and glass scale encoder, by connecting KMotions input direct to the drivers output (short cutting second loop), this improved the Bode plot a bit (Blue line), but still not what we are looking for (see screen caps) and also no improvement on the position graph in the Bode-Plot.
Mach3 is a lot more sensitive using G0 command, even had to take back the P Gain to avoid oscillations on deceleration (had to Kill the drive several times). Can't quiet understand way we cant get an accurate position graph in the Bode-Plot we receive the counts very well in Mach3. If G0Y200 is given, it nicely race to 200.
I've also include a printout of the Panasonic settings. Hope this will get us a bit closer (sure ill be an expert by the time we are done, lol) Many thanks
Henk Kuala Lumpur Malaysia
On Sat, May 5, 2012 at 2:04 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
I probably would not have "increased the velocity integrator" (whatever that is) in the Panasonic Drive. We mainly want fast damping (velocity feedback) to kill oscillations. An integrator is usually used to improve accuracy or persistant errors which for damping purposes don't really matter. And an Integrator is highly de-stablizing.
Some minor comments:
Your screen shots have critical info covered up.
A D gain of 0.001 will have no effect.
Please repeat the settings I've decribed in the previous email (lead/lag + low pass filter). When you had violent oscillations you should have reduced the P gain to 0.1 or whatever to eliminate them. There should always be a low enough gain to make it stable.
The belt could be a problem. Unfortunately it is a Catch 22. As we need the servo to perform reasonably to get a good Bode plot - but we need a good Bode Plot to see how to improve the Servo...
Regards
TK
Sent: Friday, May 4, 2012 3:27 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [8 Attachments]
Dear Tom,
What am I doing wrong?
Spend most of today running test and making screen captures, (I'm starting to pull my hair out).
What I've done today:
* Yes I've read the links you presented me, it's getting a bit clearer but there are still holes for me.
* First re-tuned the MSDA (Panasonic) drives (using auto tuning) no setting was changed.
* Then increased the machine stiffness setting .
* Increased the velocity gain, till it started vibrating, then backed off a bit.
* Also increased the velocity integrator.
* All done inside the MSDA Drive.
Then turned all filters and settings off, with only the P=1 (inside KMotion)
There was a bit of improvement shown (less vibrations in the Position graph).
Then, turned on the lead-leg compensator (Pole-Zero) at n1,n2 at 15 and d1,d2 at 60hz but had to turn the machine off as violent vibrations appeared. so increased the numbers to a level where all vibrations where gone n1-n2 =58 d1-d2=230.
Also applied Low pass filter 2nd on Filter 2, as well as a normal low pass filter (all improved a bit).
Then played around with a lot of settings al little steps (see Screen caps attached).
It sort of looks like its getting there (or it's in there somewhere).
One major issue still remains, when we look at the Bode Plot, I can't seem to get the blue line to cross the 0db (to get a 30 Hz Bandwidth), also can't get the blue to follow the red in the Bode-Plot Time-Domain (how important is this, and are there exceptions?).
Mach3 is responding well though.
I still have to mention that there is a Timing Belt between the Servo Motor and Lead screw.
Hope this will give you a picture of what is going on.
PS
Are there other people in this Group that have a similar set-up as what I've got (DAC in Cascade)?
Really hope you can help.
Many thanks
Henk
On Fri, May 4, 2012 at 4:55 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
That doesn't look good. I worry that your Amplifier is not well tuned. You will need to test that using the Panasonic Software. That is not our responsibility. With a good/tight velocity loop handled by the amplifier simple P gain alone used for the position loop should give reasonable performance.
But otherwise: lets shoot for a bandwidth of about 30Hz. So set the lead/lag compensator to be centered around that. Yours is much too high. Try N1 N2 = 15Hz and D1 D2 = 60 Hz.
Also add a Low pass filter #2 of 2nd order 500 Hz Q=1.4 (this will greatly reduce spikes on the output - green plot)
For now keep I=D=0
Increase P until it goes unstable, then reduce until it is well stable.
Collect Plots (if you save as type *.png they will be much smaller).
Have you read the other threads about how to get a reasonable Bode Plot measurement. There must be a high enough amplitude such that you get significant movement (red plot) without saturating the Output (green plot). Also the frequency cutoff needs to be reduced at the same time so that the blue plot is moving slow enough that the red plot somewhat tries to follow it. If the red plot doesn't at least look like it is trying to follow the noisy blue plot the result will not be meaningful).
Regards
TK
Sent: Thursday, May 3, 2012 6:47 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [7 Attachments]
Dear Tom,
Thanks for the reply.
I've spend a lot more time on my machine today, and made some progress.
* I've used a Pole-Zero Filter n1-n2 at 58 Hz and D1-D2 at 300 Hz, this was by trail and error went all the way up and down, and this is where I ended up.
* Only P at 1 is left I and D only gave more instability.
* Try to use a low pass filter at various frequencies, but that did not get rid of the oscillations either.
Now the positive, Mach3 reacts really nice and solid G0 no overshoot or large oscillations, I had before the Pole-Zero Filter.
The question is, do you have any suggestions to further improve this system (please look at the attached screen shots) and how much more accurate you think we can get this?
Many thanks
Henk
On Wed, May 2, 2012 at 3:35 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
Nothing special looks wrong, but here are some comments.
Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
Your wiring is very clean :}
KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
Here are some threads and topics that may help get better results and plots
Regards
TK
Hi Tom,
My set-up is as follows:
Second hand EDM rebuild to cnc.
Kflop+Kanalog.
400 Watt AC Panasonic Servo's in Velocity control (auto tuning)
Glass scales on the table to close the loop to the Kflop (1 Micron resolution).
Using Mach3
I've been spending a lot of time tuning this system, and I'm very close (I think).
This is what I've got so far:
* Auto tuned the Panasonic drives using Panasonic software.
* Adjusted P I D and Low Pass filter values, getting Command and Position very close.
* Very good position control and stiff
Still and up with oscillations.
So I've gone back to minimal settings, and hope you can tell me a bit more how to interperet the Bode plot, find attached file.
Many thanks
Henk
|
|
Group: DynoMotion |
Message: 4779 |
From: Tom Kerekes |
Date: 5/5/2012 |
Subject: Re: Kflop tuning, which filter to use [17 Attachments] |
Hi Henk,
I'm having trouble following all that you did. It isn't clear to me which plots are after "fixing" the amplifier settings and which plots are with motor feedback vs glass scale. The last two plots are confusing. Supposedly nearly same settings (P=0.3 vs P=0.35) and much different response. The strange thing also is that in one case only ~14 DAC counts are needed and in the other ~45 DAC counts are needed to go at the same speed? These are both very small voltages to the Amplifier. But you are testing a relatively low speed 4000 counts/sec = 4mm/sec. Is that correct? What speed do you need to go? It may help to reduce the input range of the Amplifier so that 10V in gives your max desired speed and not something much higher.
To get a good Bode Plot you need to look at the Time domain and Frequency Domain with the same settings. In general I think your amplitude is too low and the frequency cutoff too high to get a good measurement. The green plot and the right green scale it the output that is being driven to the Amplifier in DAC Counts. In most of your measurements it is driving with 5 counts or less this is only 5/2048 = 0.2% of full scale! Or 20mv out of the 10V range to the amplifier. Also having the Output (green) follow the Command(blue) is not a good thing at all. This will occur whenever you have only P Gain and no movement of the motor. It is necessary to have the Position(red) follow the Command(blue) at least somewhat. If it doesn't, then we are exciting the system outside of it's
ability to respond and not really getting useful information. Sorry it is so complicated, but that is just the way servo control is :}
As expected connecting the feedback from the motor rather than the linear scales is much easier to control.
You shouldn't have a problem in Mach3 that you don't have from the Step Response Screen. If you do it just means that you are simply not testing with the same acceleration or distance of motion.
I don't think a D gain of 1 is doing anything useful so keep that set at 0.
I'm not familiar with the Panasonic Drive or any of its settings. The better you can make it control velocity the better the position loop will be.
But basically the 2nd to last plot (#26) looks reasonable (maybe add in the small amount of I = 0.00001).
Regards
TK
Group: DynoMotion |
Message: 4780 |
From: Henk Sterk |
Date: 5/6/2012 |
Subject: Re: Kflop tuning, which filter to use |
Tom, Spend an other day in the workshop, try to figure this out. The screen caps I send you yesterday, have little notes in the right bottom corner, that where you can see when I changed the settings in the Drive, the season I left the other in, so you can see the difference.
The reason why there is a change in Dac counts, is because I try to see if there would be a difference, using a higher count rate out of the MSDA drive (send to max) I must have forgotten the put it in the note (sorry).
I've tried something new today, I used my 4th axis (currently not connected to the machine (no load), which is also a MSDA drive only 200 Watt) used the encoder feedback from the drive to close the loop to Kmotion (all settings on the MSDA where factory default where needed). I did a Bode plot, and ended up with the same result, position not following the command in the Bode Plot, and the magnitude plot not crossing the 0 db line.
Don't know what to do anymore, I've tried about every setting there is (I think) from min to max (machine vibration). Are you sure there is not a bug in the firmware, communication between Kanalog and KMotion?
Are there other people with this set-up? As a last bit of info: Max Servo rpm=3000 Belt step down ratio =4 Glass encoder counts = 2000/mm Ball screw 5mm/rev C3.
Also a "Panasonic MSDA.txt" was included with the last mail, which is an export of the servo settings. I don't want to give up on this (motion controller), as I know this should work, and the result is going to be amazing.
Many thanks for your patience and feedback. Regards Henk
On Sun, May 6, 2012 at 2:42 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
I'm having trouble following all that you did. It isn't clear to me which plots are after "fixing" the amplifier settings and which plots are with motor feedback vs glass scale. The last two plots are confusing. Supposedly nearly same settings (P=0.3 vs P=0.35) and much different response. The strange thing also is that in one case only ~14 DAC counts are needed and in the other ~45 DAC counts are needed to go at the same speed? These are both very small voltages to the Amplifier. But you are testing a relatively low speed 4000 counts/sec = 4mm/sec. Is that correct? What speed do you need to go? It may help to reduce the input range of the Amplifier so that 10V in gives your max desired speed and not something much higher.
To get a good Bode Plot you need to look at the Time domain and Frequency Domain with the same settings. In general I think your amplitude is too low and the frequency cutoff too high to get a good measurement. The green plot and the right green scale it the output that is being driven to the Amplifier in DAC Counts. In most of your measurements it is driving with 5 counts or less this is only 5/2048 = 0.2% of full scale! Or 20mv out of the 10V range to the amplifier. Also having the Output (green) follow the Command(blue) is not a good thing at all. This will occur whenever you have only P Gain and no movement of the motor. It is necessary to have the Position(red) follow the Command(blue) at least somewhat. If it doesn't, then we are exciting the system outside of it's
ability to respond and not really getting useful information. Sorry it is so complicated, but that is just the way servo control is :}
As expected connecting the feedback from the motor rather than the linear scales is much easier to control.
You shouldn't have a problem in Mach3 that you don't have from the Step Response Screen. If you do it just means that you are simply not testing with the same acceleration or distance of motion.
I don't think a D gain of 1 is doing anything useful so keep that set at 0.
I'm not familiar with the Panasonic Drive or any of its settings. The better you can make it control velocity the better the position loop will be.
But basically the 2nd to last plot (#26) looks reasonable (maybe add in the small amount of I = 0.00001).
Regards
TK
Sent: Saturday, May 5, 2012 2:40 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [17 Attachments]
Today's progress.
I found an issue that improved some of the things:
There is an acceleration and deceleration setting inside the MSDA that was set during first trails (jog at installation), and apparently interfere with closed loop controllers (now set to zero).
This fixed the issue in the Bode plot, where now the command and the output following each other (the position line remains an issue).
I've also tested the Pole-Zero filter (as suggested), taking P all the way down combined with the 2nd low-pass 2 filter, that did not seem to improve our Bode Plot (open Loop) razing the Blue line above the 0 db.
Then I eliminated the timing belt and glass scale encoder, by connecting KMotions input direct to the drivers output (short cutting second loop), this improved the Bode plot a bit (Blue line), but still not what we are looking for (see screen caps) and also no improvement on the position graph in the Bode-Plot.
Mach3 is a lot more sensitive using G0 command, even had to take back the P Gain to avoid oscillations on deceleration (had to Kill the drive several times).
Can't quiet understand way we cant get an accurate position graph in the Bode-Plot we receive the counts very well in Mach3. If G0Y200 is given, it nicely race to 200.
I've also include a printout of the Panasonic settings.
Hope this will get us a bit closer (sure ill be an expert by the time we are done, lol)
Many thanks
Henk
Kuala Lumpur Malaysia
On Sat, May 5, 2012 at 2:04 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
I probably would not have "increased the velocity integrator" (whatever that is) in the Panasonic Drive. We mainly want fast damping (velocity feedback) to kill oscillations. An integrator is usually used to improve accuracy or persistant errors which for damping purposes don't really matter. And an Integrator is highly de-stablizing.
Some minor comments:
Your screen shots have critical info covered up.
A D gain of 0.001 will have no effect.
Please repeat the settings I've decribed in the previous email (lead/lag + low pass filter). When you had violent oscillations you should have reduced the P gain to 0.1 or whatever to eliminate them. There should always be a low enough gain to make it stable.
The belt could be a problem. Unfortunately it is a Catch 22. As we need the servo to perform reasonably to get a good Bode plot - but we need a good Bode Plot to see how to improve the Servo...
Regards
TK
Sent: Friday, May 4, 2012 3:27 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [8 Attachments]
Dear Tom,
What am I doing wrong?
Spend most of today running test and making screen captures, (I'm starting to pull my hair out).
What I've done today:
* Yes I've read the links you presented me, it's getting a bit clearer but there are still holes for me.
* First re-tuned the MSDA (Panasonic) drives (using auto tuning) no setting was changed.
* Then increased the machine stiffness setting .
* Increased the velocity gain, till it started vibrating, then backed off a bit.
* Also increased the velocity integrator.
* All done inside the MSDA Drive.
Then turned all filters and settings off, with only the P=1 (inside KMotion)
There was a bit of improvement shown (less vibrations in the Position graph).
Then, turned on the lead-leg compensator (Pole-Zero) at n1,n2 at 15 and d1,d2 at 60hz but had to turn the machine off as violent vibrations appeared. so increased the numbers to a level where all vibrations where gone n1-n2 =58 d1-d2=230.
Also applied Low pass filter 2nd on Filter 2, as well as a normal low pass filter (all improved a bit).
Then played around with a lot of settings al little steps (see Screen caps attached).
It sort of looks like its getting there (or it's in there somewhere).
One major issue still remains, when we look at the Bode Plot, I can't seem to get the blue line to cross the 0db (to get a 30 Hz Bandwidth), also can't get the blue to follow the red in the Bode-Plot Time-Domain (how important is this, and are there exceptions?).
Mach3 is responding well though.
I still have to mention that there is a Timing Belt between the Servo Motor and Lead screw.
Hope this will give you a picture of what is going on.
PS
Are there other people in this Group that have a similar set-up as what I've got (DAC in Cascade)?
Really hope you can help.
Many thanks
Henk
On Fri, May 4, 2012 at 4:55 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
That doesn't look good. I worry that your Amplifier is not well tuned. You will need to test that using the Panasonic Software. That is not our responsibility. With a good/tight velocity loop handled by the amplifier simple P gain alone used for the position loop should give reasonable performance.
But otherwise: lets shoot for a bandwidth of about 30Hz. So set the lead/lag compensator to be centered around that. Yours is much too high. Try N1 N2 = 15Hz and D1 D2 = 60 Hz.
Also add a Low pass filter #2 of 2nd order 500 Hz Q=1.4 (this will greatly reduce spikes on the output - green plot)
For now keep I=D=0
Increase P until it goes unstable, then reduce until it is well stable.
Collect Plots (if you save as type *.png they will be much smaller).
Have you read the other threads about how to get a reasonable Bode Plot measurement. There must be a high enough amplitude such that you get significant movement (red plot) without saturating the Output (green plot). Also the frequency cutoff needs to be reduced at the same time so that the blue plot is moving slow enough that the red plot somewhat tries to follow it. If the red plot doesn't at least look like it is trying to follow the noisy blue plot the result will not be meaningful).
Regards
TK
Sent: Thursday, May 3, 2012 6:47 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [7 Attachments]
Dear Tom,
Thanks for the reply.
I've spend a lot more time on my machine today, and made some progress.
* I've used a Pole-Zero Filter n1-n2 at 58 Hz and D1-D2 at 300 Hz, this was by trail and error went all the way up and down, and this is where I ended up.
* Only P at 1 is left I and D only gave more instability.
* Try to use a low pass filter at various frequencies, but that did not get rid of the oscillations either.
Now the positive, Mach3 reacts really nice and solid G0 no overshoot or large oscillations, I had before the Pole-Zero Filter.
The question is, do you have any suggestions to further improve this system (please look at the attached screen shots) and how much more accurate you think we can get this?
Many thanks
Henk
On Wed, May 2, 2012 at 3:35 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
Nothing special looks wrong, but here are some comments.
Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
Your wiring is very clean :}
KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
Here are some threads and topics that may help get better results and plots
Regards
TK
Hi Tom,
My set-up is as follows:
Second hand EDM rebuild to cnc.
Kflop+Kanalog.
400 Watt AC Panasonic Servo's in Velocity control (auto tuning)
Glass scales on the table to close the loop to the Kflop (1 Micron resolution).
Using Mach3
I've been spending a lot of time tuning this system, and I'm very close (I think).
This is what I've got so far:
* Auto tuned the Panasonic drives using Panasonic software.
* Adjusted P I D and Low Pass filter values, getting Command and Position very close.
* Very good position control and stiff
Still and up with oscillations.
So I've gone back to minimal settings, and hope you can tell me a bit more how to interperet the Bode plot, find attached file.
Many thanks
Henk
|
|
Group: DynoMotion |
Message: 4784 |
From: Fouijar |
Date: 5/6/2012 |
Subject: Re: Kflop tuning, which filter to use |
Hello Henk,
I have a similar system but with direct drive transmission.
My motors are AC servo 2000 counts/mm (BS C3 25-05)
I had many troubles setting up my gains in my servo drive, I had to reduce the I value to a very low value and I also had to check that the position gain is lower than speed gain by something like 20-30%.
When I settled my Speed input reference gain at i.e. 250 rpm/Volt I wasn't able to get good results, so I started with a lower value, i.e. 100rpm/Volt and increased when I could get something to work until I reached the Stability limit. I also had to check my Kmotion PID parameters, but not too much.
I tuned my servo drives manually and had no good results unitl I choosed to use Kmotion's feedforward velocity (not accel.)
The system work with PID correction, indicative values for my system in Kmotion P: 5 I: 0.022 D: 35 FFV: 0.011
Every parameter as a very sensitive action on my system, especially I and FFV
I had to do as you are, check step by step. It took a long time before getting things to work, and it wasn't "very stable".
If you have ripple it's generally due to a P too big and/or I.
Don't use the I value to start your tests, just P and D.
When I look to your P value in the #22 screen shot Bode plot, it seems to be very small.
Now, in example, on my system it's nearly like that:
http://f1.grp.yahoofs.com/v1/AKCmTz4Miw5JL7W3Owt0FIp3ITyz07sWU12BrlHn04EM3zrI9V95pujWRNjaAUycCcPbRTg3P_BSjKqn0hnP7XWvCmGL9A/Fouijar%20CNC%20Files/XaxisBodePD.png
I used the IIR filter method I gave you, which is lead/lag compensation.
Seeing your graphs, I would increase the P,D and suppress the I. Try to use the FF Vel. I started with a value of 1 and decreased by a factor of ten=> 1;0.1;0.01
When you think you reach something better take a Bode plot screenshot to see what changed. I think you cut-off freq is approx 10 Hz increase it to 100Hz.
I'll try to help as I can.
Keep going,
Jerome
--- In DynoMotion@yahoogroups.com, Henk Sterk <henk.sterk@...> wrote:
>
> Tom,
>
> Spend an other day in the workshop, try to figure this out.
>
> The screen caps I send you yesterday, have little notes in the right
> bottom corner, that where you can see when I changed the settings in the
> Drive, the season I left the other in, so you can see the difference.
>
> The reason why there is a change in Dac counts, is because I try to see if
> there would be a difference, using a higher count rate out of the MSDA
> drive (send to max) I must have forgotten the put it in the note (sorry).
>
>
> I've tried something new today, I used my 4th axis (currently not
> connected to the machine (no load), which is also a MSDA drive only 200
> Watt) used the encoder feedback from the drive to close the loop to Kmotion
> (all settings on the MSDA where factory default where needed). I did a Bode
> plot, and ended up with the same result, position not following the command
> in the Bode Plot, and the magnitude plot not crossing the 0 db line.
>
> Don't know what to do anymore, I've tried about every setting there is (I
> think) from min to max (machine vibration).
> Are you sure there is not a bug in the firmware, communication between
> Kanalog and KMotion?
> Are there other people with this set-up?
>
> As a last bit of info:
>
> Max Servo rpm=3000
> Belt step down ratio =4
> Glass encoder counts = 2000/mm
> Ball screw 5mm/rev C3.
>
> Also a "Panasonic MSDA.txt" was included with the last mail, which is an
> export of the servo settings.
>
> I don't want to give up on this (motion controller), as I know this should
> work, and the result is going to be amazing.
>
> Many thanks for your patience and feedback.
>
> Regards
>
> Henk
>
>
>
>
>
>
> On Sun, May 6, 2012 at 2:42 AM, Tom Kerekes <tk@...> wrote:
>
> > **
> >
> >
> > Hi Henk,
> >
> > I'm having trouble following all that you did. It isn't clear to me which
> > plots are after "fixing" the amplifier settings and which plots are with
> > motor feedback vs glass scale. The last two plots are confusing.
> > Supposedly nearly same settings (P=0.3 vs P=0.35) and much different
> > response. The strange thing also is that in one case only ~14 DAC counts
> > are needed and in the other ~45 DAC counts are needed to go at the same
> > speed? These are both very small voltages to the Amplifier. But you are
> > testing a relatively low speed 4000 counts/sec = 4mm/sec. Is that
> > correct? What speed do you need to go? It may help to reduce the input
> > range of the Amplifier so that 10V in gives your max desired speed and
> > not something much higher.
> >
> > To get a good Bode Plot you need to look at the Time domain and Frequency
> > Domain with the same settings. In general I think your amplitude is too
> > low and the frequency cutoff too high to get a good measurement. The green
> > plot and the right green scale it the output that is being driven to the
> > Amplifier in DAC Counts. In most of your measurements it is driving with
> > 5 counts or less this is only 5/2048 = 0.2% of full scale! Or 20mv out
> > of the 10V range to the amplifier. Also having the Output (green) follow
> > the Command(blue) is not a good thing at all. This will occur whenever you
> > have only P Gain and no movement of the motor. It is necessary to have the
> > Position(red) follow the Command(blue) at least somewhat. If it doesn't,
> > then we are exciting the system outside of it's ability to respond and not
> > really getting useful information. Sorry it is so complicated, but that is
> > just the way servo control is :}
> >
> > As expected connecting the feedback from the motor rather than the linear
> > scales is much easier to control.
> >
> > You shouldn't have a problem in Mach3 that you don't have from the Step
> > Response Screen. If you do it just means that you are simply not testing
> > with the same acceleration or distance of motion.
> >
> > I don't think a D gain of 1 is doing anything useful so keep that set at 0.
> >
> > I'm not familiar with the Panasonic Drive or any of its settings. The
> > better you can make it control velocity the better the position loop will
> > be.
> >
> > But basically the 2nd to last plot (#26) looks reasonable (maybe add in
> > the small amount of I = 0.00001).
> >
> > Regards
> > TK
> >
> >
> >
> >
> > *From:* Henk Sterk <henk.sterk@...>
> > *To:* DynoMotion@yahoogroups.com
> > *Sent:* Saturday, May 5, 2012 2:40 AM
> > *Subject:* Re: [DynoMotion] Kflop tuning, which filter to use [17
> > Attachments]
> >
> >
> > Today's progress.
> >
> > I found an issue that improved some of the things:
> > There is an acceleration and deceleration setting inside the MSDA that
> > was set during first trails (jog at installation), and apparently
> > interfere with closed loop controllers (now set to zero).
> > This fixed the issue in the Bode plot, where now the command and
> > the output following each other (the position line remains an issue).
> >
> > I've also tested the Pole-Zero filter (as suggested), taking P all the way
> > down combined with the 2nd low-pass 2 filter, that did not seem to
> > improve our Bode Plot (open Loop) razing the Blue line above the 0 db.
> >
> > Then I eliminated the timing belt and glass scale encoder, by connecting
> > KMotions input direct to the drivers output (short cutting second loop),
> > this improved the Bode plot a bit (Blue line), but still not what we are
> > looking for (see screen caps) and also no improvement on the position graph
> > in the Bode-Plot.
> >
> > Mach3 is a lot more sensitive using G0 command, even had to take back the
> > P Gain to avoid oscillations on deceleration (had to Kill the drive several
> > times).
> >
> > Can't quiet understand way we cant get an accurate position graph in the
> > Bode-Plot we receive the counts very well in Mach3. If G0Y200 is given, it
> > nicely race to 200.
> >
> > I've also include a printout of the Panasonic settings.
> >
> > Hope this will get us a bit closer (sure ill be an expert by the time we
> > are done, lol)
> >
> > Many thanks
> >
> > Henk
> >
> > Kuala Lumpur Malaysia
> >
> >
> >
> >
> >
> >
> > On Sat, May 5, 2012 at 2:04 AM, Tom Kerekes <tk@...> wrote:
> >
> > **
> >
> > Hi Henk,
> >
> > I probably would not have "increased the velocity integrator" (whatever
> > that is) in the Panasonic Drive. We mainly want fast damping (velocity
> > feedback) to kill oscillations. An integrator is usually used to improve
> > accuracy or persistant errors which for damping purposes don't really
> > matter. And an Integrator is highly de-stablizing.
> >
> > Some minor comments:
> >
> > Your screen shots have critical info covered up.
> >
> > A D gain of 0.001 will have no effect.
> >
> > Please repeat the settings I've decribed in the previous email (lead/lag
> > + low pass filter). When you had violent oscillations you should have
> > reduced the P gain to 0.1 or whatever to eliminate them. There should
> > always be a low enough gain to make it stable.
> >
> > The belt could be a problem. Unfortunately it is a Catch 22. As we need
> > the servo to perform reasonably to get a good Bode plot - but we need a
> > good Bode Plot to see how to improve the Servo...
> >
> > Regards
> > TK
> >
> >
> > *From:* Henk Sterk <henk.sterk@...>
> > *To:* DynoMotion@yahoogroups.com
> > *Sent:* Friday, May 4, 2012 3:27 AM
> > *Subject:* Re: [DynoMotion] Kflop tuning, which filter to use [8
> > Attachments]
> >
> >
> > Dear Tom,
> >
> > What am I doing wrong?
> > Spend most of today running test and making screen captures, (I'm starting
> > to pull my hair out).
> > What I've done today:
> > * Yes I've read the links you presented me, it's getting a bit clearer but
> > there are still holes for me.
> > * First re-tuned the MSDA (Panasonic) drives (using auto tuning) no
> > setting was changed.
> > * Then increased the machine stiffness setting .
> > * Increased the velocity gain, till it started vibrating, then backed off
> > a bit.
> > * Also increased the velocity integrator.
> >
> > * All done inside the MSDA Drive.
> > Then turned all filters and settings off, with only the P=1 (inside
> > KMotion)
> > There was a bit of improvement shown (less vibrations in the Position
> > graph).
> > Then, turned on the lead-leg compensator (Pole-Zero) at n1,n2 at 15 and
> > d1,d2 at 60hz but had to turn the machine off as violent vibrations
> > appeared. so increased the numbers to a level where all vibrations where
> > gone n1-n2 =58 d1-d2=230.
> >
> > Also applied Low pass filter 2nd on Filter 2, as well as a normal low
> > pass filter (all improved a bit).
> >
> > Then played around with a lot of settings al little steps (see Screen
> > caps attached).
> >
> > It sort of looks like its getting there (or it's in there somewhere).
> >
> > One major issue still remains, when we look at the Bode Plot, I can't seem
> > to get the blue line to cross the 0db (to get a 30 Hz Bandwidth), also
> > can't get the blue to follow the red in the Bode-Plot Time-Domain (how
> > important is this, and are there exceptions?).
> >
> > Mach3 is responding well though.
> >
> > I still have to mention that there is a Timing Belt between the Servo
> > Motor and Lead screw.
> >
> > Hope this will give you a picture of what is going on.
> >
> > PS
> >
> > Are there other people in this Group that have a similar set-up as what
> > I've got (DAC in Cascade)?
> >
> > Really hope you can help.
> >
> > Many thanks
> >
> > Henk
> >
> >
> > On Fri, May 4, 2012 at 4:55 AM, Tom Kerekes <tk@...> wrote:
> >
> > **
> >
> > Hi Henk,
> >
> > That doesn't look good. I worry that your Amplifier is not well tuned.
> > You will need to test that using the Panasonic Software. That is not our
> > responsibility. With a good/tight velocity loop handled by the amplifier
> > simple P gain alone used for the position loop should give reasonable
> > performance.
> >
> > But otherwise: lets shoot for a bandwidth of about 30Hz. So set the
> > lead/lag compensator to be centered around that. Yours is much too high.
> > Try N1 N2 = 15Hz and D1 D2 = 60 Hz.
> >
> > Also add a Low pass filter #2 of 2nd order 500 Hz Q=1.4 (this will
> > greatly reduce spikes on the output - green plot)
> >
> > For now keep I=D=0
> >
> > Increase P until it goes unstable, then reduce until it is well stable.
> >
> > Collect Plots (if you save as type *.png they will be much smaller).
> >
> > Have you read the other threads about how to get a reasonable Bode Plot
> > measurement. There must be a high enough amplitude such that you get
> > significant movement (red plot) without saturating the Output (green
> > plot). Also the frequency cutoff needs to be reduced at the same time so
> > that the blue plot is moving slow enough that the red plot somewhat tries
> > to follow it. If the red plot doesn't at least look like it is trying to
> > follow the noisy blue plot the result will not be meaningful).
> >
> > Regards
> > TK
> >
> > *From:* Henk Sterk <henk.sterk@...>
> > *To:* DynoMotion@yahoogroups.com
> > *Sent:* Thursday, May 3, 2012 6:47 AM
> > *Subject:* Re: [DynoMotion] Kflop tuning, which filter to use [7
> > Attachments]
> >
> >
> > Dear Tom,
> >
> > Thanks for the reply.
> >
> > I've spend a lot more time on my machine today, and made some progress.
> >
> > * I've used a Pole-Zero Filter n1-n2 at 58 Hz and D1-D2 at 300 Hz, this
> > was by trail and error went all the way up and down, and this is where I
> > ended up.
> > * Only P at 1 is left I and D only gave more instability.
> > * Try to use a low pass filter at various frequencies, but that did not
> > get rid of the oscillations either.
> >
> > Now the positive, Mach3 reacts really nice and solid G0 no overshoot or
> > large oscillations, I had before the Pole-Zero Filter.
> >
> > The question is, do you have any suggestions to further improve this
> > system (please look at the attached screen shots) and how much more
> > accurate you think we can get this?
> >
> > Many thanks
> >
> > Henk
> >
> > On Wed, May 2, 2012 at 3:35 AM, Tom Kerekes <tk@...> wrote:
> >
> > **
> >
> > Hi Henk,
> >
> > Nothing special looks wrong, but here are some comments.
> >
> > Not sure how well your auto tune works so we don't know how well the
> > velocity loop is being handled by your amplifier.
> >
> > Your wiring is very clean :}
> >
> > KFLOP is unaware of motor currents as those are handled externally in the
> > drive in your case. So select the plot modes which show Output (DAC)
> > rather than currents.
> >
> > D Gain has the main purpose of providing positive phase to increase phase
> > margin. Your D gain is so small it has no effect in the ~40 Hz range. You
> > can see that as the plot of the Compensator Phase on the Bode Plot Screen.
> >
> > Here are some threads and topics that may help get better results and plots
> >
> >
> > http://www.cnczone.com/forums/dynomotion_kflop_kanalog/142000-optimizing_servo_tuning.html
> >
> >
> > http://www.cnczone.com/forums/dynomotion_kflop_kanalog/142770-servo_tuning_snapamp.html
> >
> > http://tech.groups.yahoo.com/group/DynoMotion/message/2123
> >
> > http://tech.groups.yahoo.com/group/DynoMotion/message/4233
> >
> > Regards
> > TK
> >
> >
> > *From:* Henk Sterk <henk.sterk@...>
> > *To:* DynoMotion@yahoogroups.com
> > *Sent:* Tuesday, May 1, 2012 8:32 AM
> > *Subject:* [DynoMotion] Kflop tuning, which filter to use [4 Attachments]
> >
> >
> > Hi Tom,
> >
> > My set-up is as follows:
> >
> > Second hand EDM rebuild to cnc.
> > Kflop+Kanalog.
> > 400 Watt AC Panasonic Servo's in Velocity control (auto tuning)
> > Glass scales on the table to close the loop to the Kflop (1 Micron
> > resolution).
> > Using Mach3
> >
> > I've been spending a lot of time tuning this system, and I'm very close (I
> > think).
> > This is what I've got so far:
> >
> > * Auto tuned the Panasonic drives using Panasonic software.
> > * Adjusted P I D and Low Pass filter values, getting Command and Position
> > very close.
> > * Very good position control and stiff
> >
> >
> > Still and up with oscillations.
> >
> > So I've gone back to minimal settings, and hope you can tell me a bit more
> > how to interperet the Bode plot, find attached file.
> >
> > Many thanks
> >
> > Henk
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
|
|
Group: DynoMotion |
Message: 4785 |
From: Tom Kerekes |
Date: 5/6/2012 |
Subject: Re: Kflop tuning, which filter to use |
Hi Henk,
BTW a good Bode Plot is not absolutely necessary. It is only a tool to help you. Many Controllers (like your Panasonic?) may not even provide it at all. I hope you appreciate the capability of KMotion to create a full spectrum Bode Plot at the push of a button which in the past would have required a number of circuit changes, signal injectors, scopes, and a lot of time and labor.
I was just reading on the LinuxCNC forum that they were discussing on how a Bode Plot would be useful for tuning. And they included this:
>>Drawing on another one of my hobbies... Here is a description of some
The article give an idea of the difficulties and includes this quote which I really appreciate
The difficulty with cut and try design techniques on feedback loops, is that to some degree the
various components of the design all interact. If changing one parameter results in oscillation, it
still cannot be said that that parameter “caused” the oscillation. It is quite possible that some
modest changes elsewhere in the loop may solve the problem perfectly well. Trying to get a loop to
work, “blind”, is one of the more frustrating activities I can think of.
Anyway back to your case :}
As I said in the last email I think you are mainly not using a high enough Amplitude of stimulus to get a reasonable Bode Plot. I didn't see where you attempted higher Amplitude.
If I did the math correctly your system parameters regarding max speed are:
3000/4 * 5 = 3750mm/min (148ipm) = 62.5mm/sec = 125000 counts/sec
You have been testing with small moves and low speeds (4000 counts/sec). This is fine but you should also test at higher speeds.
As I said in your last email the 2nd to last plot from your previous email is quite reasonable by simply using P gain. You didn't zoom in (left click drag) or plot following error. But it seems to settle to 1 count which would be 0.5um. So why don't you go back to that condition and let's see how well that works for you and if we can possibly make small incremental improvements.
Regards
TK
Group: DynoMotion |
Message: 4802 |
From: Henk Sterk |
Date: 5/7/2012 |
Subject: Re: Kflop tuning, which filter to use |
Dear Tom, Yes I'm very impressed with the Kmotion and it's software, and I'm happy with it. It's a bit frustrating that the MSDA drives do not respond to the Bode-Plot, could it be a filtering function (I've turned all filtering settings off, still no major change).
Can we still use some of the information from the Bode-Plot, or do you think that it might not be reliable? I've attached a few new screen caps. Is it a concern that I can't see the Voltage in the "Command, Position, Voltage Supply" screen?
Many thanks again, for you patience and input. Best regards Henk
On Mon, May 7, 2012 at 2:08 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
BTW a good Bode Plot is not absolutely necessary. It is only a tool to help you. Many Controllers (like your Panasonic?) may not even provide it at all. I hope you appreciate the capability of KMotion to create a full spectrum Bode Plot at the push of a button which in the past would have required a number of circuit changes, signal injectors, scopes, and a lot of time and labor.
I was just reading on the LinuxCNC forum that they were discussing on how a Bode Plot would be useful for tuning. And they included this:
>>Drawing on another one of my hobbies... Here is a description of some
The article give an idea of the difficulties and includes this quote which I really appreciate
The difficulty with cut and try design techniques on feedback loops, is that to some degree the
various components of the design all interact. If changing one parameter results in oscillation, it
still cannot be said that that parameter “caused” the oscillation. It is quite possible that some
modest changes elsewhere in the loop may solve the problem perfectly well. Trying to get a loop to
work, “blind”, is one of the more frustrating activities I can think of.
Anyway back to your case :}
As I said in the last email I think you are mainly not using a high enough Amplitude of stimulus to get a reasonable Bode Plot. I didn't see where you attempted higher Amplitude.
If I did the math correctly your system parameters regarding max speed are:
3000/4 * 5 = 3750mm/min (148ipm) = 62.5mm/sec = 125000 counts/sec
You have been testing with small moves and low speeds (4000 counts/sec). This is fine but you should also test at higher speeds.
As I said in your last email the 2nd to last plot from your previous email is quite reasonable by simply using P gain. You didn't zoom in (left click drag) or plot following error. But it seems to settle to 1 count which would be 0.5um. So why don't you go back to that condition and let's see how well that works for you and if we can possibly make small incremental improvements.
Regards
TK
Sent: Sunday, May 6, 2012 4:19 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use
Tom,
Spend an other day in the workshop, try to figure this out.
The screen caps I send you yesterday, have little notes in the right bottom corner, that where you can see when I changed the settings in the Drive, the season I left the other in, so you can see the difference.
The reason why there is a change in Dac counts, is because I try to see if there would be a difference, using a higher count rate out of the MSDA drive (send to max) I must have forgotten the put it in the note (sorry).
I've tried something new today, I used my 4th axis (currently not connected to the machine (no load), which is also a MSDA drive only 200 Watt) used the encoder feedback from the drive to close the loop to Kmotion (all settings on the MSDA where factory default where needed). I did a Bode plot, and ended up with the same result, position not following the command in the Bode Plot, and the magnitude plot not crossing the 0 db line.
Don't know what to do anymore, I've tried about every setting there is (I think) from min to max (machine vibration).
Are you sure there is not a bug in the firmware, communication between Kanalog and KMotion?
Are there other people with this set-up?
As a last bit of info:
Max Servo rpm=3000
Belt step down ratio =4
Glass encoder counts = 2000/mm
Ball screw 5mm/rev C3.
Also a "Panasonic MSDA.txt" was included with the last mail, which is an export of the servo settings.
I don't want to give up on this (motion controller), as I know this should work, and the result is going to be amazing.
Many thanks for your patience and feedback.
Regards
Henk
On Sun, May 6, 2012 at 2:42 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
I'm having trouble following all that you did. It isn't clear to me which plots are after "fixing" the amplifier settings and which plots are with motor feedback vs glass scale. The last two plots are confusing. Supposedly nearly same settings (P=0.3 vs P=0.35) and much different response. The strange thing also is that in one case only ~14 DAC counts are needed and in the other ~45 DAC counts are needed to go at the same speed? These are both very small voltages to the Amplifier. But you are testing a relatively low speed 4000 counts/sec = 4mm/sec. Is that correct? What speed do you need to go? It may help to reduce the input range of the Amplifier so that 10V in gives your max desired speed and not something much higher.
To get a good Bode Plot you need to look at the Time domain and Frequency Domain with the same settings. In general I think your amplitude is too low and the frequency cutoff too high to get a good measurement. The green plot and the right green scale it the output that is being driven to the Amplifier in DAC Counts. In most of your measurements it is driving with 5 counts or less this is only 5/2048 = 0.2% of full scale! Or 20mv out of the 10V range to the amplifier. Also having the Output (green) follow the Command(blue) is not a good thing at all. This will occur whenever you have only P Gain and no movement of the motor. It is necessary to have the Position(red) follow the Command(blue) at least somewhat. If it doesn't, then we are exciting the system outside of it's ability to
respond and not really getting useful information. Sorry it is so complicated, but that is just the way servo control is :}
As expected connecting the feedback from the motor rather than the linear scales is much easier to control.
You shouldn't have a problem in Mach3 that you don't have from the Step Response Screen. If you do it just means that you are simply not testing with the same acceleration or distance of motion.
I don't think a D gain of 1 is doing anything useful so keep that set at 0.
I'm not familiar with the Panasonic Drive or any of its settings. The better you can make it control velocity the better the position loop will be.
But basically the 2nd to last plot (#26) looks reasonable (maybe add in the small amount of I = 0.00001).
Regards
TK
Sent: Saturday, May 5, 2012 2:40 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [17 Attachments]
Today's progress.
I found an issue that improved some of the things:
There is an acceleration and deceleration setting inside the MSDA that was set during first trails (jog at installation), and apparently interfere with closed loop controllers (now set to zero).
This fixed the issue in the Bode plot, where now the command and the output following each other (the position line remains an issue).
I've also tested the Pole-Zero filter (as suggested), taking P all the way down combined with the 2nd low-pass 2 filter, that did not seem to improve our Bode Plot (open Loop) razing the Blue line above the 0 db.
Then I eliminated the timing belt and glass scale encoder, by connecting KMotions input direct to the drivers output (short cutting second loop), this improved the Bode plot a bit (Blue line), but still not what we are looking for (see screen caps) and also no improvement on the position graph in the Bode-Plot.
Mach3 is a lot more sensitive using G0 command, even had to take back the P Gain to avoid oscillations on deceleration (had to Kill the drive several times).
Can't quiet understand way we cant get an accurate position graph in the Bode-Plot we receive the counts very well in Mach3. If G0Y200 is given, it nicely race to 200.
I've also include a printout of the Panasonic settings.
Hope this will get us a bit closer (sure ill be an expert by the time we are done, lol)
Many thanks
Henk
Kuala Lumpur Malaysia
On Sat, May 5, 2012 at 2:04 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
I probably would not have "increased the velocity integrator" (whatever that is) in the Panasonic Drive. We mainly want fast damping (velocity feedback) to kill oscillations. An integrator is usually used to improve accuracy or persistant errors which for damping purposes don't really matter. And an Integrator is highly de-stablizing.
Some minor comments:
Your screen shots have critical info covered up.
A D gain of 0.001 will have no effect.
Please repeat the settings I've decribed in the previous email (lead/lag + low pass filter). When you had violent oscillations you should have reduced the P gain to 0.1 or whatever to eliminate them. There should always be a low enough gain to make it stable.
The belt could be a problem. Unfortunately it is a Catch 22. As we need the servo to perform reasonably to get a good Bode plot - but we need a good Bode Plot to see how to improve the Servo...
Regards
TK
Sent: Friday, May 4, 2012 3:27 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [8 Attachments]
Dear Tom,
What am I doing wrong?
Spend most of today running test and making screen captures, (I'm starting to pull my hair out).
What I've done today:
* Yes I've read the links you presented me, it's getting a bit clearer but there are still holes for me.
* First re-tuned the MSDA (Panasonic) drives (using auto tuning) no setting was changed.
* Then increased the machine stiffness setting .
* Increased the velocity gain, till it started vibrating, then backed off a bit.
* Also increased the velocity integrator.
* All done inside the MSDA Drive.
Then turned all filters and settings off, with only the P=1 (inside KMotion)
There was a bit of improvement shown (less vibrations in the Position graph).
Then, turned on the lead-leg compensator (Pole-Zero) at n1,n2 at 15 and d1,d2 at 60hz but had to turn the machine off as violent vibrations appeared. so increased the numbers to a level where all vibrations where gone n1-n2 =58 d1-d2=230.
Also applied Low pass filter 2nd on Filter 2, as well as a normal low pass filter (all improved a bit).
Then played around with a lot of settings al little steps (see Screen caps attached).
It sort of looks like its getting there (or it's in there somewhere).
One major issue still remains, when we look at the Bode Plot, I can't seem to get the blue line to cross the 0db (to get a 30 Hz Bandwidth), also can't get the blue to follow the red in the Bode-Plot Time-Domain (how important is this, and are there exceptions?).
Mach3 is responding well though.
I still have to mention that there is a Timing Belt between the Servo Motor and Lead screw.
Hope this will give you a picture of what is going on.
PS
Are there other people in this Group that have a similar set-up as what I've got (DAC in Cascade)?
Really hope you can help.
Many thanks
Henk
On Fri, May 4, 2012 at 4:55 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
That doesn't look good. I worry that your Amplifier is not well tuned. You will need to test that using the Panasonic Software. That is not our responsibility. With a good/tight velocity loop handled by the amplifier simple P gain alone used for the position loop should give reasonable performance.
But otherwise: lets shoot for a bandwidth of about 30Hz. So set the lead/lag compensator to be centered around that. Yours is much too high. Try N1 N2 = 15Hz and D1 D2 = 60 Hz.
Also add a Low pass filter #2 of 2nd order 500 Hz Q=1.4 (this will greatly reduce spikes on the output - green plot)
For now keep I=D=0
Increase P until it goes unstable, then reduce until it is well stable.
Collect Plots (if you save as type *.png they will be much smaller).
Have you read the other threads about how to get a reasonable Bode Plot measurement. There must be a high enough amplitude such that you get significant movement (red plot) without saturating the Output (green plot). Also the frequency cutoff needs to be reduced at the same time so that the blue plot is moving slow enough that the red plot somewhat tries to follow it. If the red plot doesn't at least look like it is trying to follow the noisy blue plot the result will not be meaningful).
Regards
TK
Sent: Thursday, May 3, 2012 6:47 AM
Subject: Re: [DynoMotion] Kflop tuning, which filter to use [7 Attachments]
Dear Tom,
Thanks for the reply.
I've spend a lot more time on my machine today, and made some progress.
* I've used a Pole-Zero Filter n1-n2 at 58 Hz and D1-D2 at 300 Hz, this was by trail and error went all the way up and down, and this is where I ended up.
* Only P at 1 is left I and D only gave more instability.
* Try to use a low pass filter at various frequencies, but that did not get rid of the oscillations either.
Now the positive, Mach3 reacts really nice and solid G0 no overshoot or large oscillations, I had before the Pole-Zero Filter.
The question is, do you have any suggestions to further improve this system (please look at the attached screen shots) and how much more accurate you think we can get this?
Many thanks
Henk
On Wed, May 2, 2012 at 3:35 AM, Tom Kerekes <tk@...> wrote:
Hi Henk,
Nothing special looks wrong, but here are some comments.
Not sure how well your auto tune works so we don't know how well the velocity loop is being handled by your amplifier.
Your wiring is very clean :}
KFLOP is unaware of motor currents as those are handled externally in the drive in your case. So select the plot modes which show Output (DAC) rather than currents.
D Gain has the main purpose of providing positive phase to increase phase margin. Your D gain is so small it has no effect in the ~40 Hz range. You can see that as the plot of the Compensator Phase on the Bode Plot Screen.
Here are some threads and topics that may help get better results and plots
Regards
TK
Hi Tom,
My set-up is as follows:
Second hand EDM rebuild to cnc.
Kflop+Kanalog.
400 Watt AC Panasonic Servo's in Velocity control (auto tuning)
Glass scales on the table to close the loop to the Kflop (1 Micron resolution).
Using Mach3
I've been spending a lot of time tuning this system, and I'm very close (I think).
This is what I've got so far:
* Auto tuned the Panasonic drives using Panasonic software.
* Adjusted P I D and Low Pass filter values, getting Command and Position very close.
* Very good position control and stiff
Still and up with oscillations.
So I've gone back to minimal settings, and hope you can tell me a bit more how to interperet the Bode plot, find attached file.
Many thanks
Henk
|
|
Group: DynoMotion |
Message: 4803 |
From: Tom Kerekes |
Date: 5/7/2012 |
Subject: Re: Kflop tuning, which filter to use [3 Attachments] |
Hi Henk,
I think that is reasonable response. Under max acceleration with high Jerk the Max Following Error is ~40 counts or 0.02mm and much less otherwise. Is that acceptable to you? You will need to make larger moves to check higher speeds. You can plot velocity to see what velocities you are commanding and achieving.
The Bode Plot is also somewhat reasonable although noisy it shows a bandwidth of ~15Hz with some phase margin. But you still have too low of Stimulus Amplitude. I see you increased it a lot but you also set the low pass filter to a lower frequency. Lower Low pass frequency suppresses the amplitude. The overall result is that only about 20 DAC counts (green plot) are going out to the amplifier which is about 1% of full scale.
KFLOP has no access to know what Motor Supply Voltage in the Amplifier is doing so you cannot plot that. I doubt if there is any issue with the supply voltage.
Thanks for your patience.
Regards
TK
Group: DynoMotion |
Message: 4833 |
From: Henk |
Date: 5/8/2012 |
Subject: Re: Kflop tuning, which filter to use |
Thanks Tom,
I spend a bit more time on it today (stopped looking at the Bode-Plot) and I'm quite happy with the result.
Up to the next challenge, homing.
Thanks again for input.
Regards
Henk
Sent from my iPad On 07/05/2012, at 23:14, Tom Kerekes <tk@...> wrote:
Hi Henk,
I think that is reasonable response. Under max acceleration with high Jerk the Max Following Error is ~40 counts or 0.02mm and much less otherwise. Is that acceptable to you? You will need to make larger moves to check higher speeds. You can plot velocity to see what velocities you are commanding and achieving.
The Bode Plot is also somewhat reasonable although noisy it shows a bandwidth of ~15Hz with some phase margin. But you still have too low of Stimulus Amplitude. I see you increased it a lot but you also set the low pass filter to a lower frequency. Lower Low pass frequency suppresses the amplitude. The overall result is that only about 20 DAC counts (green plot) are going out to the amplifier which is about 1% of full scale.
KFLOP has no access to know what Motor Supply Voltage in the Amplifier is doing so you cannot plot that. I doubt if there is any issue with the supply voltage.
Thanks for your patience.
Regards
TK
| | | | | | | | | | | | | |